Fix of enum warnings for MSVC 2022 ROS2 windows rolling build#2343
Fix of enum warnings for MSVC 2022 ROS2 windows rolling build#2343knmcguire wants to merge 1 commit intoeclipse-cyclonedds:releases/0.10.xfrom
Conversation
Generated-by: Claude Code Opus-4.5 (Release 2025/11/01) .
|
We have noticed that this PR together with the master branch of cyclone dds also resolves those warnings. ros2/rmw_cyclonedds#550 I'll close this PR for now, but we can reopen if necessary. |
|
just reopened this, but this simple fix will help us out extremely for just ros2 ci to move to MSVC 2022 for the time being. Seems that the other PR just needs more time Also mind that this is "only" a patch for 0.10.x branch, to which the ros2.repos is pointed towards |
|
It may be "only" a patch to 0.10.x, but:
Changing the build flags on VS2022 makes more sense to me than changing the code here. The warning level appears to be set at Line 111 in 76360fb compile_options(/W3 /wd5286 /wd5287) would also solve the problem. Perhaps you can give that a try?
|
|
Hi! Ah sorry I should have given a little bit more context and my last comment was perhaps a bit too short and pragmatic. This PR patch is only meant to be very temporary but just for us infra team to get some form of CI going before the lyrical release as we only have a mere few weeks or even less to finalize all work for this. I'm aware of the other work and PR you are doing and have tried the latest master of cyclonedds (I posted a run of that in PR) and that is meant to be the final solution. This patch is therefore only meant to take the pressure of to get if all merged in time and to enable us to get the ci scaffolding in place just for the time being so that others can hunt down regressions, to be then replaced by cyclone dds' new release and new RMW We have tried of setting the compile flag for cmake on colcon level but they resulted in build errors, so I had to chase it microlevel cmake lines in a whack a mole fashion (but it's been a while ago so can't remember the details). Anyway, hope that makes it a bit clear about the intention of this PR |
Hi!
This PR is fixing the enum comparison warnings for MSVC 2022 builds for ROS2 on windows (warning C5286 C5287). Cyclone-dds 0.10.x was resulting in over 1500 warnings (See this on the ros2 ci: https://ci.ros2.org/job/test_ci_windows/687/)
With this patch in place, the warnings were resolved (see this test build on ros2 ci).
I'll leave this in draft so that you and the ROS PMC can discuss if this change is desired. An alternative would be to fix this all by all local cmake suppressions of these warnings, but that was a wack-a-mole that required that suppression in a lot of cmake. This was a patch that required the least amount of code change but perhaps not something to be desired.
Related to ros2/ci#832 (comment)
Just let me know what you think.